org.springframework.roo.classpath.itd
Class AbstractItdTypeDetailsProvidingMetadataItem
java.lang.Object
org.springframework.roo.metadata.AbstractMetadataItem
org.springframework.roo.classpath.itd.AbstractItdTypeDetailsProvidingMetadataItem
- All Implemented Interfaces:
- ItdTypeDetailsProvidingMetadataItem, org.springframework.roo.metadata.MetadataItem
public class AbstractItdTypeDetailsProvidingMetadataItem
- extends org.springframework.roo.metadata.AbstractMetadataItem
- implements ItdTypeDetailsProvidingMetadataItem
Abstract implementation of ItdTypeDetailsProvidingMetadataItem
, which assumes the subclass will require
a non-null ClassOrInterfaceTypeDetails
representing the governor and wishes to build an ITD via the
DefaultItdTypeDetailsBuilder
mechanism.
- Since:
- 1.0
- Author:
- Ben Alex
Fields inherited from class org.springframework.roo.metadata.AbstractMetadataItem |
valid |
Methods inherited from class org.springframework.roo.metadata.AbstractMetadataItem |
getId, isValid |
Methods inherited from interface org.springframework.roo.metadata.MetadataItem |
getId, isValid |
governorTypeDetails
protected ClassOrInterfaceTypeDetails governorTypeDetails
itdTypeDetails
protected ItdTypeDetails itdTypeDetails
destination
protected org.springframework.roo.model.JavaType destination
aspectName
protected org.springframework.roo.model.JavaType aspectName
governorPhysicalTypeMetadata
protected PhysicalTypeMetadata governorPhysicalTypeMetadata
builder
protected DefaultItdTypeDetailsBuilder builder
AbstractItdTypeDetailsProvidingMetadataItem
public AbstractItdTypeDetailsProvidingMetadataItem(String identifier,
org.springframework.roo.model.JavaType aspectName,
PhysicalTypeMetadata governorPhysicalTypeMetadata)
- Validates input and constructs a superclass that implements
ItdTypeDetailsProvidingMetadataItem
.
Exposes the ClassOrInterfaceTypeDetails
of the governor, if available. If they are not available, ensures
AbstractMetadataItem.isValid()
returns false.
Subclasses should generally return immediately if AbstractMetadataItem.isValid()
is false. Subclasses should also attempt to set the
itdTypeDetails
to contain the output of their ITD where AbstractMetadataItem.isValid()
is true.
- Parameters:
identifier
- the identifier for this item of metadata (required)aspectName
- the Java type of the ITD (required)governorPhysicalTypeMetadata
- the governor, which is expected to contain a ClassOrInterfaceTypeDetails
(required)
getItdTypeDetails
public final ItdTypeDetails getItdTypeDetails()
- Description copied from interface:
ItdTypeDetailsProvidingMetadataItem
- Obtains the
ItdTypeDetails
, if available.
An ItdTypeDetails
should be returned even if no members should be introduced. Only return
null if there was a failure during parsing or other unexpected condition.
- Specified by:
getItdTypeDetails
in interface ItdTypeDetailsProvidingMetadataItem
- Returns:
- the details, or null if the details are unavailable or no ITD is required
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2010 VMware, Inc. All Rights Reserved.