de.grogra.reflect
Class IntersectionType

java.lang.Object
  extended by de.grogra.reflect.MemberBase
      extended by de.grogra.reflect.TypeImpl<java.lang.Object>
          extended by de.grogra.reflect.IntersectionType
All Implemented Interfaces:
Member, Type<java.lang.Object>

public class IntersectionType
extends TypeImpl<java.lang.Object>


Field Summary
 
Fields inherited from class de.grogra.reflect.TypeImpl
typeId
 
Fields inherited from class de.grogra.reflect.MemberBase
annots, declaringType, descriptor, modifiers, name
 
Fields inherited from interface de.grogra.reflect.Type
BOOLEAN, BYTE, CHAR, CLASS, DOUBLE, FLOAT, FLOATING_POINT, INT, INTEGRAL, INVALID, LOCAL_CLASS_MODIFIERS, LONG, MEMBER_CLASS_MODIFIERS, MEMBER_INTERFACE_MODIFIERS, NULL, NUMBER, NUMERIC, OBJECT, SHORT, STRING, TOP_LEVEL_CLASS_MODIFIERS, TOP_LEVEL_INTERFACE_MODIFIERS, TYPE, TYPE_0, VOID
 
Fields inherited from interface de.grogra.reflect.Member
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Constructor Summary
IntersectionType(java.lang.String pkg)
           
IntersectionType(Type<?> base)
           
 
Method Summary
 void addInterface(Type<?> iface)
           
 java.lang.String getBinaryName()
           
 Type<?> getBinaryType()
           
 Type<?> getComponentType()
           
 Type<?> getDeclaredInterface(int index)
           
 int getDeclaredInterfaceCount()
           
 java.lang.String getDescriptor()
          Returns a descriptor for this member.
 java.lang.Class<java.lang.Object> getImplementationClass()
           
 java.lang.String getName()
          Returns the name of this member.
 java.lang.String getPackage()
           
 java.lang.String getSimpleName()
          Returns the simple name of this member.
 Type<java.lang.Object> getSupertype()
           
 void intersect(Type<?> t)
           
 boolean isInstance(java.lang.Object o)
           
 void narrow(Type<?> newBase)
           
 Type<?> simplify()
           
 
Methods inherited from class de.grogra.reflect.TypeImpl
cloneObject, createArray, getArrayType, getDeclaredField, getDeclaredFieldCount, getDeclaredMethod, getDeclaredMethodCount, getDeclaredType, getDeclaredTypeCount, getDefaultElementValue, getLookup, getTypeId, getTypeLoader, isStringSerializable, newInstance, toString, valueOf
 
Methods inherited from class de.grogra.reflect.MemberBase
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getModifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.reflect.Member
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getModifiers
 

Constructor Detail

IntersectionType

public IntersectionType(java.lang.String pkg)

IntersectionType

public IntersectionType(Type<?> base)
Method Detail

addInterface

public void addInterface(Type<?> iface)

getBinaryName

public java.lang.String getBinaryName()
Specified by:
getBinaryName in interface Type<java.lang.Object>
Overrides:
getBinaryName in class TypeImpl<java.lang.Object>

getBinaryType

public Type<?> getBinaryType()

getComponentType

public Type<?> getComponentType()
Specified by:
getComponentType in interface Type<java.lang.Object>
Overrides:
getComponentType in class TypeImpl<java.lang.Object>

getDeclaredInterface

public Type<?> getDeclaredInterface(int index)
Specified by:
getDeclaredInterface in interface Type<java.lang.Object>
Overrides:
getDeclaredInterface in class TypeImpl<java.lang.Object>

getDeclaredInterfaceCount

public int getDeclaredInterfaceCount()
Specified by:
getDeclaredInterfaceCount in interface Type<java.lang.Object>
Overrides:
getDeclaredInterfaceCount in class TypeImpl<java.lang.Object>

getDescriptor

public java.lang.String getDescriptor()
Description copied from interface: Member
Returns a descriptor for this member. Descriptors are constructed as follows:

Specified by:
getDescriptor in interface Member
Overrides:
getDescriptor in class MemberBase
Returns:
the member's descriptor

getImplementationClass

public java.lang.Class<java.lang.Object> getImplementationClass()
Specified by:
getImplementationClass in interface Type<java.lang.Object>
Overrides:
getImplementationClass in class TypeImpl<java.lang.Object>

getName

public java.lang.String getName()
Description copied from interface: Member
Returns 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 equals Member.getSimpleName().

Specified by:
getName in interface Member
Overrides:
getName in class MemberBase
Returns:
name of the member

getPackage

public java.lang.String getPackage()
Specified by:
getPackage in interface Type<java.lang.Object>
Overrides:
getPackage in class TypeImpl<java.lang.Object>

getSimpleName

public java.lang.String getSimpleName()
Description copied from interface: Member
Returns 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:
getSimpleName in interface Member
Overrides:
getSimpleName in class TypeImpl<java.lang.Object>
Returns:
simple name of the member

getSupertype

public Type<java.lang.Object> getSupertype()
Specified by:
getSupertype in interface Type<java.lang.Object>
Overrides:
getSupertype in class TypeImpl<java.lang.Object>

intersect

public void intersect(Type<?> t)

isInstance

public boolean isInstance(java.lang.Object o)
Specified by:
isInstance in interface Type<java.lang.Object>
Overrides:
isInstance in class TypeImpl<java.lang.Object>

narrow

public void narrow(Type<?> newBase)

simplify

public Type<?> simplify()