|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.analysis.collector.AttachPoint
public abstract class AttachPoint
Identifies objects in an object graph (all public and private fields contained within an object and those it references). For instance,
AttachPoint.isClass(TypeA.class).and(AttachPoint.isNestedIn(TypeB.class)will match any objects of type
TypeA that are referenced (or
accessible through) an object of type TypeB.
| Constructor Summary | |
|---|---|
protected |
AttachPoint()
Protected constructor to prevent instantiation, but allow subclassing. |
| Method Summary | |
|---|---|
AttachPoint |
and(AttachPoint that)
Returns an attach point which performs the logical AND between two attach points, matching an object only if both attach points match the object. |
static AttachPoint |
isClass(Class<?> type)
Returns an attach point that matches an object if its type is equal to the specified type. |
static AttachPoint |
isDeclaredIn(Class<?> parentType)
Returns an attach point that matches an object if it is a declared field of the specified type. |
static AttachPoint |
isNestedIn(Class<?> ancestorType)
Returns an attach point that matches an object if it is nested inside a class of the specified type. |
static AttachPoint |
isSubclass(Class<?> type)
Returns an attach point that matches an object if it is an instance of the specified type. |
abstract boolean |
matches(Stack<Object> parents,
Object object)
Returns true if the specified object in the object graph matches
some criteria; and false otherwise. |
static AttachPoint |
not(AttachPoint that)
Returns an attach point which performs the logical NOT on the given attach point, matching an object only if the attach point does not match the object. |
AttachPoint |
or(AttachPoint that)
Returns an attach point which performs the logical OR between two attach points, matching an object if either or both of the attach points match the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AttachPoint()
| Method Detail |
|---|
public AttachPoint and(AttachPoint that)
that - the second attach point
public AttachPoint or(AttachPoint that)
that - the second attach point
public static AttachPoint not(AttachPoint that)
that - the original attach point
public static AttachPoint isClass(Class<?> type)
type - the required type of the object
public static AttachPoint isSubclass(Class<?> type)
type - the required type/supertype of the object
public static AttachPoint isDeclaredIn(Class<?> parentType)
parentType - the parent type
public static AttachPoint isNestedIn(Class<?> ancestorType)
ancestorType - the ancestor type
public abstract boolean matches(Stack<Object> parents,
Object object)
true if the specified object in the object graph matches
some criteria; and false otherwise.
parents - the path from the root (starting) object to the current
objectobject - the current object
true if the specified object in the object graph matches
some criteria; and false otherwise
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||