Interface PropertyHolderSource<O extends JavaSource<O>>
-
- Type Parameters:
O- owningJavaSourcetype
- All Superinterfaces:
FieldHolder<O>,FieldHolderSource<O>,InterfaceCapable,MemberHolder<O>,MemberHolderSource<O>,MethodHolder<O>,MethodHolderSource<O>,PropertyHolder<O>
- All Known Subinterfaces:
JavaClassSource,JavaEnumSource,JavaInterfaceSource
public interface PropertyHolderSource<O extends JavaSource<O>> extends PropertyHolder<O>, MethodHolderSource<O>, FieldHolderSource<O>
Represents aJavaSourcethat may containPropertySourcedefinitions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropertySource<O>addProperty(Class<?> type, String name)Add a newPropertydeclaration to thisPropertyHolderSourceinstance.PropertySource<O>addProperty(String type, String name)Add a newPropertydeclaration to thisPropertyHolderSourceinstance.PropertySource<O>addProperty(JavaType<?> type, String name)Add a newPropertydeclaration to thisPropertyHolderSourceinstance.List<PropertySource<O>>getProperties()Get a list of allPropertiesdeclared by thisPropertyHolder, or return an empty list if noPropertiesare declared.List<PropertySource<O>>getProperties(Class<?> type)Get a list of allPropertiesdeclared by thisPropertyHolderwith the given type, or return an empty list if no matchingPropertiesare declared.PropertySource<O>getProperty(String name)Get thePropertywith the given name and return it, otherwise, return null.PropertyHolderSource<O>removeProperty(Property<O> property)Remove the givenPropertyfrom thisPropertyHolderSourceinstance, if it exists; otherwise, do nothing.-
Methods inherited from interface org.jboss.forge.roaster.model.FieldHolder
hasField, hasField
-
Methods inherited from interface org.jboss.forge.roaster.model.source.FieldHolderSource
addField, addField, getField, getFields, removeField
-
Methods inherited from interface org.jboss.forge.roaster.model.InterfaceCapable
getInterfaces, hasInterface, hasInterface, hasInterface
-
Methods inherited from interface org.jboss.forge.roaster.model.source.MemberHolderSource
getMembers
-
Methods inherited from interface org.jboss.forge.roaster.model.MethodHolder
hasMethod, hasMethodSignature, hasMethodSignature, hasMethodSignature, hasMethodSignature
-
Methods inherited from interface org.jboss.forge.roaster.model.source.MethodHolderSource
addMethod, addMethod, addMethod, addMethod, getMethod, getMethod, getMethod, getMethods, removeMethod
-
Methods inherited from interface org.jboss.forge.roaster.model.PropertyHolder
hasProperty, hasProperty
-
-
-
-
Method Detail
-
addProperty
PropertySource<O> addProperty(String type, String name)
Add a newPropertydeclaration to thisPropertyHolderSourceinstance.
-
addProperty
PropertySource<O> addProperty(Class<?> type, String name)
Add a newPropertydeclaration to thisPropertyHolderSourceinstance.
-
addProperty
PropertySource<O> addProperty(JavaType<?> type, String name)
Add a newPropertydeclaration to thisPropertyHolderSourceinstance.
-
removeProperty
PropertyHolderSource<O> removeProperty(Property<O> property)
Remove the givenPropertyfrom thisPropertyHolderSourceinstance, if it exists; otherwise, do nothing.
-
getProperties
List<PropertySource<O>> getProperties()
Description copied from interface:PropertyHolderGet a list of allPropertiesdeclared by thisPropertyHolder, or return an empty list if noPropertiesare declared.- Specified by:
getPropertiesin interfacePropertyHolder<O extends JavaSource<O>>
-
getProperties
List<PropertySource<O>> getProperties(Class<?> type)
Description copied from interface:PropertyHolderGet a list of allPropertiesdeclared by thisPropertyHolderwith the given type, or return an empty list if no matchingPropertiesare declared.- Specified by:
getPropertiesin interfacePropertyHolder<O extends JavaSource<O>>
-
getProperty
PropertySource<O> getProperty(String name)
Description copied from interface:PropertyHolderGet thePropertywith the given name and return it, otherwise, return null.- Specified by:
getPropertyin interfacePropertyHolder<O extends JavaSource<O>>
-
-