Search in sources :

Example 1 with AccessModifier

use of org.opendaylight.mdsal.binding.model.api.AccessModifier in project mdsal by opendaylight.

the class MethodSignatureImplTest method setup.

@Before
public void setup() {
    Type type = Types.STRING;
    String name = "customMethod";
    List<AnnotationType> annotations = new ArrayList<>();
    TypeMemberComment comment = TypeMemberComment.contractOf("This is just a comment");
    AccessModifier accessModifier = AccessModifier.PUBLIC;
    Type returnType = Types.STRING;
    List<Parameter> params = new ArrayList<>();
    boolean isFinal = false;
    boolean isAbstract = false;
    boolean isStatic = false;
    signature1 = new MethodSignatureImpl(name, annotations, comment, accessModifier, returnType, params, isFinal, isAbstract, isStatic);
    signature2 = new MethodSignatureImpl(name, annotations, comment, accessModifier, returnType, params, isFinal, isAbstract, isStatic);
    returnType = null;
    signature3 = new MethodSignatureImpl(name, annotations, comment, accessModifier, returnType, params, isFinal, isAbstract, isStatic);
    name = null;
    signature4 = new MethodSignatureImpl(name, annotations, comment, accessModifier, returnType, params, isFinal, isAbstract, isStatic);
    hash1 = signature1.hashCode();
    hash4 = signature4.hashCode();
}
Also used : AnnotationType(org.opendaylight.mdsal.binding.model.api.AnnotationType) Type(org.opendaylight.mdsal.binding.model.api.Type) AccessModifier(org.opendaylight.mdsal.binding.model.api.AccessModifier) TypeMemberComment(org.opendaylight.mdsal.binding.model.api.TypeMemberComment) ArrayList(java.util.ArrayList) Parameter(org.opendaylight.mdsal.binding.model.api.MethodSignature.Parameter) AnnotationType(org.opendaylight.mdsal.binding.model.api.AnnotationType) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 AccessModifier (org.opendaylight.mdsal.binding.model.api.AccessModifier)1 AnnotationType (org.opendaylight.mdsal.binding.model.api.AnnotationType)1 Parameter (org.opendaylight.mdsal.binding.model.api.MethodSignature.Parameter)1 Type (org.opendaylight.mdsal.binding.model.api.Type)1 TypeMemberComment (org.opendaylight.mdsal.binding.model.api.TypeMemberComment)1