Class PlainJavaMarker
- java.lang.Object
-
- org.faktorips.devtools.abstraction.AWrapper<PlainJavaMarkerImpl>
-
- org.faktorips.devtools.abstraction.plainjava.internal.PlainJavaMarker
-
- All Implemented Interfaces:
AAbstraction,AMarker
public class PlainJavaMarker extends AWrapper<PlainJavaMarkerImpl> implements AMarker
-
-
Constructor Summary
Constructors Constructor Description PlainJavaMarker(PlainJavaMarkerImpl original)PlainJavaMarker(PlainJavaResource resource, java.lang.String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Deletes this marker from its associated resource.java.lang.ObjectgetAttribute(java.lang.String attributeName)Returns the value of the given attribute.booleangetAttribute(java.lang.String attributeName, boolean defaultValue)Returns the value of the given attribute of type boolean.intgetAttribute(java.lang.String attributeName, int defaultValue)Returns the value of the given attribute of type int.java.lang.StringgetAttribute(java.lang.String attributeName, java.lang.String defaultValue)Returns the value of the given attribute of type String.longgetId()Returns this marker's unique ID.java.lang.StringgetType()Returns this marker's type.booleanisError()Convenience method that returns whether this marker has a 'severity' attribute marking it as an 'error'.voidsetAttribute(java.lang.String attributeName, java.lang.Object value)Sets the value of the given attribute.voidsetAttributes(java.lang.String[] attributeNames, java.lang.Object[] values)Sets the values of the given attributes.-
Methods inherited from class org.faktorips.devtools.abstraction.AWrapper
equals, hashCode, toString, unwrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.faktorips.devtools.abstraction.AAbstraction
unwrap
-
-
-
-
Constructor Detail
-
PlainJavaMarker
public PlainJavaMarker(PlainJavaResource resource, java.lang.String type)
-
PlainJavaMarker
public PlainJavaMarker(PlainJavaMarkerImpl original)
-
-
Method Detail
-
delete
public void delete()
Description copied from interface:AMarkerDeletes this marker from its associated resource.
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attributeName)
Description copied from interface:AMarkerReturns the value of the given attribute. Attributes may be strings, integers or booleans. When an attribute is not setnullis returned.- Specified by:
getAttributein interfaceAMarker- Parameters:
attributeName- an attribute's name- Returns:
- the value associated with the given attribute
-
getAttribute
public java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)Description copied from interface:AMarkerReturns the value of the given attribute of type String. When the attribute is not set the given default value is returned.- Specified by:
getAttributein interfaceAMarker- Parameters:
attributeName- a String attribute's name- Returns:
- the value associated with the given attribute or the default value
-
getAttribute
public int getAttribute(java.lang.String attributeName, int defaultValue)Description copied from interface:AMarkerReturns the value of the given attribute of type int. When the attribute is not set the given default value is returned.- Specified by:
getAttributein interfaceAMarker- Parameters:
attributeName- an integer attribute's name- Returns:
- the value associated with the given attribute or the default value
-
getAttribute
public boolean getAttribute(java.lang.String attributeName, boolean defaultValue)Description copied from interface:AMarkerReturns the value of the given attribute of type boolean. When the attribute is not set the given default value is returned.- Specified by:
getAttributein interfaceAMarker- Parameters:
attributeName- a boolean attribute's name- Returns:
- the value associated with the given attribute or the default value
-
setAttribute
public void setAttribute(java.lang.String attributeName, java.lang.Object value)Description copied from interface:AMarkerSets the value of the given attribute. Attributes may be strings, integers or booleans. An attribute may be removed by setting its value tonull.- Specified by:
setAttributein interfaceAMarker- Parameters:
attributeName- an attribute's namevalue- the value to be associated with the given attribute
-
setAttributes
public void setAttributes(java.lang.String[] attributeNames, java.lang.Object[] values)Description copied from interface:AMarkerSets the values of the given attributes. Attributes may be strings, integers or booleans. An attribute may be removed by setting its value tonull.- Specified by:
setAttributesin interfaceAMarker- Parameters:
attributeNames- an array of attribute's namevalues- the values to be associated with the given attribute, must be of the same length as the array of attribute names
-
isError
public boolean isError()
Description copied from interface:AMarkerConvenience method that returns whether this marker has a 'severity' attribute marking it as an 'error'.
-
getType
public java.lang.String getType()
Description copied from interface:AMarkerReturns this marker's type.
-
-