Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2008, Red Hat, Inc., and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package org.jboss.weld.annotated.enhanced.jlr;
 
 import java.util.Map;
 
 
Represents an abstract annotated member (field, method or constructor)

This class is immutable, and therefore threadsafe

Parameters:
<T>
<S>
Author(s):
Pete Muir
 
 public abstract class AbstractEnhancedAnnotatedMember<T, X, S extends Memberextends AbstractEnhancedAnnotated<T, S> implements EnhancedAnnotatedMember<T, X, S> {
 
     // Cached string representation
     private String toString;
     private final EnhancedAnnotatedType<X> declaringType;

    
Constructor

Parameters:
annotationMap The annotation map
 
     protected AbstractEnhancedAnnotatedMember(AnnotatedMember<X> annotatedMemberMap<Class<? extends Annotation>, AnnotationannotationMapMap<Class<? extends Annotation>, AnnotationdeclaredAnnotationMapClassTransformer classTransformerEnhancedAnnotatedType<X> declaringType) {
         super(annotatedMemberannotationMapdeclaredAnnotationMapclassTransformer);
         this. = declaringType;
     }

    
Indicates if the member is static

Returns:
True if static, false otherwise
See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotated.isStatic()
 
     public boolean isStatic() {
         return Reflections.isStatic(getDelegate());
     }

    
Indicates if the member if final

Returns:
True if final, false otherwise
See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotated.isFinal()
 
     public boolean isFinal() {
         return Reflections.isFinal(getDelegate());
     }
 
     public boolean isTransient() {
         return Reflections.isTransient(getDelegate());
     }
 
     public boolean isPublic() {
         return Modifier.isPublic(getJavaMember().getModifiers());
     }
 
     public boolean isPrivate() {
         return Modifier.isPrivate(getJavaMember().getModifiers());
     }
 
     public boolean isPackagePrivate() {
         return Reflections.isPackagePrivate(getJavaMember().getModifiers());
     }
 
     public Package getPackage() {
         return getJavaMember().getDeclaringClass().getPackage();
     }

    
Gets the current value of the member

Parameters:
beanManager The Bean manager
Returns:
The current value public T getValue(BeanManager beanManager) { return beanManager.getInstance(getRawType(), getMetaAnnotationsAsArray(BindingType.class));


    
Gets the name of the member

    public String getName() {
        return getJavaMember().getName();
    }

    
Gets a string representation of the member

Returns:
A string representation
    @Override
    public String toString() {
        if ( != null) {
            return ;
        }
         = "Abstract annotated member " + getName();
        return ;
    }
    public S getJavaMember() {
        return getDelegate();
    }
        return ;
    }
New to GrepCode? Check out our FAQ X