Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core.resource.java
Interface JavaResourceType

All Superinterfaces:
JavaResourceAbstractType, JavaResourceAnnotatedElement, JavaResourceMember, JavaResourceModel, Model

public interface JavaResourceType
extends JavaResourceAbstractType

Java source code or binary class or interface.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceMember
JavaResourceMember.IsFinal, JavaResourceMember.IsProtected, JavaResourceMember.IsPublic, JavaResourceMember.IsStatic, JavaResourceMember.IsTransient, JavaResourceMember.NameTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement
JavaResourceAnnotatedElement.AstNodeType, JavaResourceAnnotatedElement.AstNodeTypeEquals, JavaResourceAnnotatedElement.IsAnnotated, JavaResourceAnnotatedElement.IsAnnotatedWithAnyOf
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceModel
JavaResourceModel.FileTransformer, JavaResourceModel.Root
 
Field Summary
static String ABSTRACT_PROPERTY
           
static String FIELDS_COLLECTION
           
static String METHODS_COLLECTION
           
static String NO_ARG_CONSTRUCTOR_PROPERTY
           
static String PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY
           
static String SUPERCLASS_QUALIFIED_NAME_PROPERTY
           
 
Fields inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType
DECLARING_TYPE_NAME_PROPERTY, ENUMS_COLLECTION, TYPE_BINDING_PROPERTY, TYPES_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceMember
FINAL_PROPERTY, IS_FINAL, IS_PROTECTED, IS_PUBLIC, IS_STATIC, IS_TRANSIENT, NAME_TRANSFORMER, PROTECTED_PROPERTY, PUBLIC_PROPERTY, STATIC_PROPERTY, TRANSIENT_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement
ANNOTATIONS_COLLECTION, IS_ANNOTATED, NESTABLE_ANNOTATIONS_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceModel
FILE_TRANSFORMER
 
Method Summary
 TypeBinding getAttributeTypeBinding(JavaResourceAttribute attribute)
          Return a TypeBinding for the given attribute, whether that attribute is owned directly by this type or this type has specific inherited type information for it (i.e. this type has constrained the generic type of the attribute from a superclass.)
 JavaResourceField getField(String name)
           
 Iterable<JavaResourceField> getFields()
          Return the type's fields.
 JavaResourceMethod getMethod(String name)
           
 Iterable<JavaResourceMethod> getMethods()
          Return the type's methods.
 String getSuperclassQualifiedName()
          Return the fully qualified name of the type's superclass.
 boolean hasAnyAnnotatedFields()
          Return whether the type has any field that have relevant annotations on them (which can be used to infer the type's access type).
 boolean hasAnyAnnotatedMethods()
          Return whether the type has any field that have relevant annotations on them (which can be used to infer the type's access type).
 boolean hasEqualsMethod()
          Return whether the type overrides the Object.equals(Object) method.
 boolean hasHashCodeMethod()
          Return whether the type overrides the Object.hashCode() method.
 boolean hasNoArgConstructor()
          Return whether the type has a no-arg constructor (private, protected, or public)
 boolean hasPrivateNoArgConstructor()
          Return whether the type has a private no-arg constructor
 boolean hasPublicNoArgConstructor()
          Return whether the type has a public no-arg constructor or only the default constructor.
 boolean hasPublicOrProtectedNoArgConstructor()
          Return whether the type has a public or protected no-arg constructor or only the default constructor.
 boolean isAbstract()
          Return whether the type is abstract.
 void resolveTypes(TypeDeclaration typeDeclaration)
          Resolve type information that could be dependent on changes elsewhere in the workspace.
 void synchronizeWith(TypeDeclaration typeDeclaration)
          Synchronize the [source] type with the specified AST TypeDeclaration.
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType
getAllEnums, getAllTypes, getDeclaringTypeName, getEnums, getTypeBinding, getTypes, isIn, isIn
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceMember
getName, isFinal, isFor, isProtected, isPublic, isPublicOrProtected, isStatic, isTransient, setPrimaryAnnotation
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement
addAnnotation, addAnnotation, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotationsSize, getAnnotationsSize, getAstNodeType, getContainerAnnotation, getNameTextRange, getNonNullAnnotation, getTextRange, getTopLevelAnnotations, isAnnotated, isAnnotatedWithAnyOf, moveAnnotation, removeAnnotation, removeAnnotation
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceModel
getFile, getJavaResourceCompilationUnit, getParent, getRoot, getTextRange
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 

Field Detail

SUPERCLASS_QUALIFIED_NAME_PROPERTY

static final String SUPERCLASS_QUALIFIED_NAME_PROPERTY
See Also:
Constant Field Values

ABSTRACT_PROPERTY

static final String ABSTRACT_PROPERTY
See Also:
Constant Field Values

NO_ARG_CONSTRUCTOR_PROPERTY

static final String NO_ARG_CONSTRUCTOR_PROPERTY
See Also:
Constant Field Values

PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY

static final String PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY
See Also:
Constant Field Values

FIELDS_COLLECTION

static final String FIELDS_COLLECTION
See Also:
Constant Field Values

METHODS_COLLECTION

static final String METHODS_COLLECTION
See Also:
Constant Field Values
Method Detail

synchronizeWith

void synchronizeWith(TypeDeclaration typeDeclaration)
Synchronize the [source] type with the specified AST TypeDeclaration.


resolveTypes

void resolveTypes(TypeDeclaration typeDeclaration)
Resolve type information that could be dependent on changes elsewhere in the workspace.


getSuperclassQualifiedName

String getSuperclassQualifiedName()
Return the fully qualified name of the type's superclass.


isAbstract

boolean isAbstract()
Return whether the type is abstract.


hasNoArgConstructor

boolean hasNoArgConstructor()
Return whether the type has a no-arg constructor (private, protected, or public)


hasPrivateNoArgConstructor

boolean hasPrivateNoArgConstructor()
Return whether the type has a private no-arg constructor


hasPublicOrProtectedNoArgConstructor

boolean hasPublicOrProtectedNoArgConstructor()
Return whether the type has a public or protected no-arg constructor or only the default constructor.


hasPublicNoArgConstructor

boolean hasPublicNoArgConstructor()
Return whether the type has a public no-arg constructor or only the default constructor.


hasAnyAnnotatedFields

boolean hasAnyAnnotatedFields()
Return whether the type has any field that have relevant annotations on them (which can be used to infer the type's access type).


hasAnyAnnotatedMethods

boolean hasAnyAnnotatedMethods()
Return whether the type has any field that have relevant annotations on them (which can be used to infer the type's access type).


hasEqualsMethod

boolean hasEqualsMethod()
Return whether the type overrides the Object.equals(Object) method.


hasHashCodeMethod

boolean hasHashCodeMethod()
Return whether the type overrides the Object.hashCode() method.


getFields

Iterable<JavaResourceField> getFields()
Return the type's fields.


getField

JavaResourceField getField(String name)

getMethods

Iterable<JavaResourceMethod> getMethods()
Return the type's methods. This returns *all* methods from the JDT Type


getMethod

JavaResourceMethod getMethod(String name)

getAttributeTypeBinding

TypeBinding getAttributeTypeBinding(JavaResourceAttribute attribute)
Return a TypeBinding for the given attribute, whether that attribute is owned directly by this type or this type has specific inherited type information for it (i.e. this type has constrained the generic type of the attribute from a superclass.) NB: a return value of null does not mean that the attribute does not exist within the scope of this type. It simply means that this type has no more information than the superclass has, and the superclass should be checked for this information.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.