00001 package edu.ksu.cis.bandera.specification.predicate.datastructure;
00002
00003 import edu.ksu.cis.bandera.specification.predicate.exception.*;
00004 import edu.ksu.cis.bandera.specification.predicate.node.*;
00005 import edu.ksu.cis.bandera.annotation.*;
00006 import edu.ksu.cis.bandera.jjjc.symboltable.*;
00007 import java.util.*;
00008 public final class PredicateFactory {
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 public static ExpressionPredicate createExpressionPredicate(Name name, ClassOrInterfaceType type, Node node, Vector params, Vector paramTypes, boolean isStatic, Hashtable variablesUsed, PExp constraint, String description, Vector exceptions) throws DuplicatePredicateException {
00024 ExpressionPredicate result = new ExpressionPredicate(name, type, node, exceptions);
00025 result.setParams(params);
00026 result.setParamTypes(paramTypes);
00027 result.setConstraint(constraint);
00028 result.setDescription(description);
00029 result.setStatic(isStatic);
00030 result.setVariablesUsed(variablesUsed);
00031 return result;
00032 }
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 public static InvokePredicate createInvokePredicate(Name name, ClassOrInterfaceType type, Annotation annotation, Node node, Vector params, Vector paramTypes, boolean isStatic, Hashtable variablesUsed, PExp constraint, String description, Vector exceptions) throws edu.ksu.cis.bandera.specification.predicate.exception.DuplicatePredicateException {
00049 InvokePredicate result = new InvokePredicate(name, type, annotation, node, exceptions);
00050 result.setParams(params);
00051 result.setParamTypes(paramTypes);
00052 result.setConstraint(constraint);
00053 result.setDescription(description);
00054 result.setStatic(isStatic);
00055 result.setVariablesUsed(variablesUsed);
00056 return result;
00057 }
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 public static LocationPredicate createLocationPredicate(Name name, ClassOrInterfaceType type, Annotation annotation, Node node, String label, Vector params, Vector paramTypes, boolean isStatic, Hashtable variablesUsed, PExp constraint, String description, Vector exceptions) throws edu.ksu.cis.bandera.specification.predicate.exception.DuplicatePredicateException {
00076 LocationPredicate result = new LocationPredicate(name, type, annotation, node, exceptions, label);
00077 result.setParams(params);
00078 result.setParamTypes(paramTypes);
00079 result.setConstraint(constraint);
00080 result.setDescription(description);
00081 result.setStatic(isStatic);
00082 result.setVariablesUsed(variablesUsed);
00083 return result;
00084 }
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 public static ReturnPredicate createReturnPredicate(Name name, ClassOrInterfaceType type, Annotation annotation, Node node, Vector params, Vector paramTypes, boolean isStatic, boolean ret, Hashtable variablesUsed, PExp constraint, String description, Vector exceptions) throws edu.ksu.cis.bandera.specification.predicate.exception.DuplicatePredicateException {
00103 ReturnPredicate result = new ReturnPredicate(name, type, annotation, node, exceptions, ret);
00104 result.setParams(params);
00105 result.setParamTypes(paramTypes);
00106 result.setConstraint(constraint);
00107 result.setDescription(description);
00108 result.setStatic(isStatic);
00109 result.setVariablesUsed(variablesUsed);
00110 return result;
00111 }
00112 }