org.eclipse.jst.jsf.common.util
Class JDTBeanProperty
java.lang.Object
org.eclipse.jst.jsf.common.util.JDTBeanProperty
-
Direct Known Subclasses:
-
JDTBeanPropertyWorkingCopy
-
public class JDTBeanProperty
- extends java.lang.Object
Represents a single bean property backed by JDT data
This class may not be sub-classed by clients.
Methods inherited from class java.lang.Object
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
isReadable
public boolean isReadable()
-
-
Returns:
- true if this property is readable
isWritable
public boolean isWritable()
-
-
Returns:
- true if this property is writable
getGetter
public IMethod getGetter()
-
-
Returns:
- the get accessor IMethod or null if none
getSetter
public IMethod getSetter()
-
-
Returns:
- the set mutator IMethod or null if none
getType
public IType getType()
-
-
Returns:
- the IType for this property's type or null if it
cannot determined. Note that null does not necessarily indicate an error
since some types like arrays of things do not have corresponding JDT IType's
If typeSignature represents an array, the base element IType is returned
if possible
getArrayCount
public int getArrayCount()
-
-
Returns:
- the number of array nesting levels in typeSignature.
Returns 0 if not an array.
isEnumType
public boolean isEnumType()
-
-
Returns:
- true if property is an enum type, false otherwise or if cannot be resolved
getTypeSignature
public java.lang.String getTypeSignature()
- Fully equivalent to:
getTypeSignature(true)
-
-
Returns:
- the fully resolved (if possible) type signature for
the property or null if unable to determine.
NOTE: this is the "type erasure" signature, so any type parameters
will be removed and only the raw type signature will be returned.
getTypeSignature
public java.lang.String getTypeSignature(boolean eraseTypeParameters)
-
-
Parameters:
-
eraseTypeParameters
- if true, the returned type has type parameters
erased. If false, template types are resolved.
-
Returns:
- the fully resolved (if possible) type signature for
the property or null if unable to determine.
-
See Also:
-
for more information on how specific kinds of unresolved generics are resolved
getTypeParameterSignatures
public java.util.List<java.lang.String> getTypeParameterSignatures()
- For example, if this property was formed from: List getListOfStrings()
then the list would consist of the signature "Ljava.lang.String;". All
nested type paramters are resolved
-
-
Returns:
- a list of type signatures (fully resolved if possible)
of this property's bounding type parameters.
-
See Also:
-
for more information on how specific kinds of unresolved generics are resolved