public class DefaultClassOrInterfaceTypeDetails extends AbstractMemberHoldingTypeDetails implements ClassOrInterfaceTypeDetails
ClassOrInterfaceTypeDetails.| Constructor and Description |
|---|
DefaultClassOrInterfaceTypeDetails(org.springframework.roo.model.CustomData customData,
String declaredByMetadataId,
int modifier,
List<AnnotationMetadata> annotations,
org.springframework.roo.model.JavaType name,
PhysicalTypeCategory physicalTypeCategory,
List<ConstructorMetadata> declaredConstructors,
List<FieldMetadata> declaredFields,
List<MethodMetadata> declaredMethods,
List<ClassOrInterfaceTypeDetails> declaredInnerTypes,
List<InitializerMetadata> declaredInitializers,
ClassOrInterfaceTypeDetails superclass,
List<org.springframework.roo.model.JavaType> extendsTypes,
List<org.springframework.roo.model.JavaType> implementsTypes,
List<org.springframework.roo.model.JavaSymbolName> enumConstants,
Collection<ImportMetadata> registeredImports)
Constructor is package protected to mandate the use of
ClassOrInterfaceTypeDetailsBuilder |
| Modifier and Type | Method and Description |
|---|---|
boolean |
declaresField(org.springframework.roo.model.JavaSymbolName fieldName)
Indicates whether this class or interface declares a field with the given
name
|
boolean |
extendsType(org.springframework.roo.model.JavaType type)
Indicates whether this type extends the given type.
|
List<? extends ConstructorMetadata> |
getDeclaredConstructors() |
List<? extends FieldMetadata> |
getDeclaredFields() |
List<InitializerMetadata> |
getDeclaredInitializers() |
List<ClassOrInterfaceTypeDetails> |
getDeclaredInnerTypes() |
List<? extends MethodMetadata> |
getDeclaredMethods() |
List<String> |
getDynamicFinderNames()
Returns the names of any dynamic finders
|
List<org.springframework.roo.model.JavaSymbolName> |
getEnumConstants()
Lists the enum constants this type provides.
|
List<org.springframework.roo.model.JavaType> |
getExtendsTypes()
Lists the classes this type extends.
|
List<org.springframework.roo.model.JavaType> |
getImplementsTypes()
Lists the classes this type implements.
|
Set<ImportMetadata> |
getImports()
Lists the imports this class includes.
|
org.springframework.roo.model.JavaType |
getName() |
PhysicalTypeCategory |
getPhysicalTypeCategory() |
Set<ImportMetadata> |
getRegisteredImports() |
ClassOrInterfaceTypeDetails |
getSuperclass()
Obtains the superclass if this is a class and it is available.
|
org.springframework.roo.model.JavaType |
getType()
Returns the
JavaType provided by this physical type. |
boolean |
implementsAny(org.springframework.roo.model.JavaType... types)
Indicates whether this type implements the given types.
|
boolean |
isAbstract()
Indicates whether this class, interface, or enum is abstract
|
boolean |
isInterface()
Indicates whether this element is an interface
|
String |
toString() |
getDeclaredConstructor, getDeclaredField, getDeclaredInnerType, getField, getFieldsWithAnnotation, getLayerEntities, getMethod, getMethod, getMethods, getUniqueFieldName, implementsTypegetAnnotation, getAnnotations, getTypeAnnotationgetDeclaredByMetadataId, getModifiergetCustomDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDeclaredConstructor, getDeclaredField, getDeclaredInnerType, getField, getFieldsWithAnnotation, getLayerEntities, getMethod, getMethod, getMethods, getUniqueFieldName, implementsTypegetAnnotation, getAnnotations, getTypeAnnotationgetDeclaredByMetadataId, getModifierpublic DefaultClassOrInterfaceTypeDetails(org.springframework.roo.model.CustomData customData,
String declaredByMetadataId,
int modifier,
List<AnnotationMetadata> annotations,
org.springframework.roo.model.JavaType name,
PhysicalTypeCategory physicalTypeCategory,
List<ConstructorMetadata> declaredConstructors,
List<FieldMetadata> declaredFields,
List<MethodMetadata> declaredMethods,
List<ClassOrInterfaceTypeDetails> declaredInnerTypes,
List<InitializerMetadata> declaredInitializers,
ClassOrInterfaceTypeDetails superclass,
List<org.springframework.roo.model.JavaType> extendsTypes,
List<org.springframework.roo.model.JavaType> implementsTypes,
List<org.springframework.roo.model.JavaSymbolName> enumConstants,
Collection<ImportMetadata> registeredImports)
ClassOrInterfaceTypeDetailsBuildercustomData - declaredByMetadataId - modifier - annotations - name - physicalTypeCategory - declaredConstructors - declaredFields - declaredMethods - declaredInnerTypes - declaredInitializers - superclass - extendsTypes - implementsTypes - enumConstants - registeredImports - public boolean declaresField(org.springframework.roo.model.JavaSymbolName fieldName)
ClassOrInterfaceTypeDetailsdeclaresField in interface ClassOrInterfaceTypeDetailsfieldName - the field name to check for (can be null)false if a null field name is givenpublic boolean extendsType(org.springframework.roo.model.JavaType type)
MemberHoldingTypeDetailsMemberHoldingTypeDetails.getExtendsTypes() and checking whether the given type is in the
returned list.extendsType in interface MemberHoldingTypeDetailstype - the supertype being checked for (required)public List<? extends ConstructorMetadata> getDeclaredConstructors()
getDeclaredConstructors in interface MemberHoldingTypeDetailspublic List<? extends FieldMetadata> getDeclaredFields()
getDeclaredFields in interface MemberHoldingTypeDetailspublic List<InitializerMetadata> getDeclaredInitializers()
getDeclaredInitializers in interface MemberHoldingTypeDetailspublic List<ClassOrInterfaceTypeDetails> getDeclaredInnerTypes()
getDeclaredInnerTypes in interface MemberHoldingTypeDetailspublic List<? extends MethodMetadata> getDeclaredMethods()
getDeclaredMethods in interface MemberHoldingTypeDetailspublic List<String> getDynamicFinderNames()
MemberHoldingTypeDetailsgetDynamicFinderNames in interface MemberHoldingTypeDetailsnull listpublic List<org.springframework.roo.model.JavaSymbolName> getEnumConstants()
ClassOrInterfaceTypeDetailsgetEnumConstants in interface ClassOrInterfaceTypeDetailspublic List<org.springframework.roo.model.JavaType> getExtendsTypes()
MemberHoldingTypeDetails
While a List is used, normally in Java a class will only extend a
single other class. A List is used to support interfaces, as well
as support the special
"declare parents: DestinationType extends SuperclassType" feature of ITDs
which permits effectively multiple inheritance.
getExtendsTypes in interface MemberHoldingTypeDetailspublic List<org.springframework.roo.model.JavaType> getImplementsTypes()
MemberHoldingTypeDetails
A List is used to support interfaces, as well as support the
special "declare parents: DestinationType implements SomeInterfaceType"
feature of ITDs.
getImplementsTypes in interface MemberHoldingTypeDetailspublic Set<ImportMetadata> getImports()
MemberHoldingTypeDetailsgetImports in interface MemberHoldingTypeDetailspublic org.springframework.roo.model.JavaType getName()
getName in interface PhysicalTypeDetails#getType(), which returns the same thing but is better namedpublic PhysicalTypeCategory getPhysicalTypeCategory()
getPhysicalTypeCategory in interface PhysicalTypeDetailsPhysicalTypeDetails instance (never null)public Set<ImportMetadata> getRegisteredImports()
getRegisteredImports in interface ClassOrInterfaceTypeDetailspublic ClassOrInterfaceTypeDetails getSuperclass()
ClassOrInterfaceTypeDetailsgetSuperclass in interface ClassOrInterfaceTypeDetailspublic org.springframework.roo.model.JavaType getType()
PhysicalTypeDetailsJavaType provided by this physical type. If possible,
indicates any type parameters.getType in interface PhysicalTypeDetailspublic boolean implementsAny(org.springframework.roo.model.JavaType... types)
MemberHoldingTypeDetailsMemberHoldingTypeDetails.getImplementsTypes() and checking whether the given
types are in the returned list.implementsAny in interface MemberHoldingTypeDetailstypes - the interfaces being checked for (required)public boolean isAbstract()
ClassOrInterfaceTypeDetailsisAbstract in interface ClassOrInterfaceTypeDetailspublic boolean isInterface()
ClassOrInterfaceTypeDetailsisInterface in interface ClassOrInterfaceTypeDetailsCopyright © 2009–2018 Pivotal Software, Inc.. All rights reserved.