2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.implementation.java.impl
Class JavaElementImpl
java.lang.Object
org.apache.tuscany.sca.implementation.java.impl.JavaElementImpl
- Direct Known Subclasses:
- JavaParameterImpl
public class JavaElementImpl
- extends java.lang.Object
This class represents a java element such as a Package, Class, Constructor,
Field, Method or Parameter.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
JavaElementImpl
public JavaElementImpl(java.lang.Package pkg)
JavaElementImpl
public JavaElementImpl(java.lang.Class<?> cls)
JavaElementImpl
public JavaElementImpl(java.lang.reflect.Field field)
JavaElementImpl
public JavaElementImpl(java.lang.reflect.Constructor<?> constructor,
int index)
JavaElementImpl
public JavaElementImpl(java.lang.reflect.Method method,
int index)
JavaElementImpl
public JavaElementImpl(java.lang.String name,
java.lang.Class<?> type,
java.lang.Class<? extends java.lang.annotation.Annotation> classifer)
- For testing purpose
- Parameters:
name
- type
- classifer
- TODOelementType
-
getAnchor
public java.lang.reflect.AnnotatedElement getAnchor()
- Returns:
- the anchor
getElementType
public java.lang.annotation.ElementType getElementType()
- Returns:
- the elementType
getGenericType
public java.lang.reflect.Type getGenericType()
- Returns:
- the genericType
getIndex
public int getIndex()
- Returns:
- the index
getType
public java.lang.Class<?> getType()
- Returns:
- the type
getAnnotations
public java.lang.annotation.Annotation[] getAnnotations()
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationType)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
getName
public java.lang.String getName()
- Returns:
- the name
setName
public void setName(java.lang.String name)
- Parameters:
name
- the name to set
getClassifer
public java.lang.Class<? extends java.lang.annotation.Annotation> getClassifer()
- Returns:
- the classifier
setClassifer
public void setClassifer(java.lang.Class<? extends java.lang.annotation.Annotation> classifer)
- Parameters:
classifer
- the classifier to set