java.lang.Object
de.grogra.xl.compiler.scope.Scope
de.grogra.xl.compiler.scope.Package
- All Implemented Interfaces:
Member
-
Field Summary
Fields inherited from interface de.grogra.reflect.Member
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, GLOBAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanvoiddeclareType(Type type) final booleanfindDeclaredType(String name) voidfindMembers(String name, int flags, Members list) Finds all members which are declared in this scope or enclosing scopes.final StringgetCanonicalName(String member) getDeclaredAnnotation(int index) intfinal TypeReturns the declaring type of which this is a member.final StringReturns a descriptor for this member.final intReturns the modifiers of this member as a combination of the bit masks which are defined in this interface.final StringgetName()Returns the name of this member.Return one of the declared type if any.final PackageReturns the innermost enclosing scope of classPackage, ornull.final StringReturns the simple name of this member.protected Typefinal StringtoString()Methods inherited from class de.grogra.xl.compiler.scope.Scope
dump, encloses, getCompiler, getDeclaredType, getDefaultModuleSuperclass, getEnclosingScope, getExtension, getInstantiationProducerType, getOwnerOf, getPropertyModel, getQueryModel, getRoot, insert, isD2FImplicit, isEnabledConversion, isShadowedBy, isStatic
-
Constructor Details
-
Package
-
-
Method Details
-
getDeclaredEntity
- Overrides:
getDeclaredEntityin classScope
-
getPackage
Description copied from class:ScopeReturns the innermost enclosing scope of classPackage, ornull. May bethis.- Overrides:
getPackagein classScope- Returns:
- innermost
Packagescope
-
findMembers
Description copied from class:ScopeFinds all members which are declared in this scope or enclosing scopes. This method should be overwritten by subclasses; an invocation ofsuper.findMembershas to be included in order to look for members in enclosing scopes. Theflagsare a combination of the bit masks defined inMembers, they are used to restrict the range of possible members.- Overrides:
findMembersin classScope- Parameters:
name- simple name of the members to findflags- combination of masks defined inMemberslist- found members are added to this list
-
declareType
-
findDeclaredType
-
findType
-
loadType
-
getCanonicalName
-
contains
-
getDeclaringType
Description copied from interface:MemberReturns the declaring type of which this is a member. May benullif such a type does not exist.- Specified by:
getDeclaringTypein interfaceMember- Returns:
- this member's declaring type
-
getModifiers
public final int getModifiers()Description copied from interface:MemberReturns the modifiers of this member as a combination of the bit masks which are defined in this interface.- Specified by:
getModifiersin interfaceMember- Returns:
- modifiers of this member
-
getName
Description copied from interface:MemberReturns the name of this member. For types, this is the canonical name of the type, e.g,java.lang.Object,java.util.Map.Entry. Otherwise, it equalsMember.getSimpleName(). -
getSimpleName
Description copied from interface:MemberReturns the simple name of this member. This is the single identifier with which the member is declared in source code, e.g.,Object,out,println.- Specified by:
getSimpleNamein interfaceMember- Returns:
- simple name of the member
-
getDescriptor
Description copied from interface:MemberReturns a descriptor for this member. Descriptors are constructed as follows:- For types, descriptors are defined as for the Java Virtual
Machine. For primitive types these are the single characters
'Z', 'B', 'S', 'C', 'I', 'J', 'F', 'D', 'V'
for
boolean,byte,short,char,int,long,float,double,void. For array types, the descriptor is the character '[' plus the descriptor of its component type, e.g.,[[Iforint[][]. For non-array reference types, the descriptor is the character 'L', followed by the binary name (seeType.getBinaryName()) of the type, where '.' has to be replaced by '/', followed by ';', e.g.,Ljava/lang/Object;. - For fields, the descriptor is the character 'f', followed by the
simple name of the field, followed by the character ';', followed
by the descriptor of the field's type. E.g.,
fout;Ljava/io/PrintStream;for the fieldSystem.out. - For methods and constructors, the descriptor is the character
'm', followed by the simple name of the method (which is
<init>for constructors), followed by the characters ';' and '(', followed by the descriptors of the method's parameter types, followed by ')', followed by the descriptor of the return type. E.g.mprintln;(Ljava/lang/String;)Vfor the methodPrintStream.println(String).
- Specified by:
getDescriptorin interfaceMember- Returns:
- the member's descriptor
- For types, descriptors are defined as for the Java Virtual
Machine. For primitive types these are the single characters
'Z', 'B', 'S', 'C', 'I', 'J', 'F', 'D', 'V'
for
-
toString
-
equals
-
getDeclaredAnnotationCount
public int getDeclaredAnnotationCount()- Specified by:
getDeclaredAnnotationCountin interfaceMember
-
getDeclaredAnnotation
- Specified by:
getDeclaredAnnotationin interfaceMember
-
getOneType
Return one of the declared type if any.
-