org.glassfish.pfl.dynamic.codegen.spi
Interface MemberInfo

All Known Subinterfaces:
FieldInfo, MethodInfo, ModifiableFieldReference, ModifiableMethod
All Known Implementing Classes:
FieldGenerator, FieldInfoImpl, MemberInfoBase, MethodGenerator, MethodInfoBase, MethodInfoReflectiveImpl

public interface MemberInfo

An interface that provides information common to all kinds of class members. This includes data members (represented by FieldInfo) and methods and constructors (represented by MethodInfo). This can be used to describe both MethodGenerators that are used to generate code and pre-existing Java classes.


Method Summary
 boolean isAccessibleInContext(ClassInfo definingClass, ClassInfo accessClass)
          Returns true iff this member is accessible in the context defined by definingClass (the class containing the reference to the member) and accessClass (the type of the expression used to access this member).
 int modifiers()
          Return the modifiers on this member
 ClassInfo myClassInfo()
          Return the ClassInfo of the class that contains this member.
 String name()
          Return the name of this member.
 

Method Detail

myClassInfo

ClassInfo myClassInfo()
Return the ClassInfo of the class that contains this member.


modifiers

int modifiers()
Return the modifiers on this member


name

String name()
Return the name of this member.


isAccessibleInContext

boolean isAccessibleInContext(ClassInfo definingClass,
                              ClassInfo accessClass)
Returns true iff this member is accessible in the context defined by definingClass (the class containing the reference to the member) and accessClass (the type of the expression used to access this member). This works as follows:

Parameters:
definingClass - the ClassInfo of the class in which the access occurs.
accessClass - the ClassInfo of the class used to access the member.


Copyright © 2013 Oracle. All Rights Reserved.