本文整理汇总了Java中lucee.runtime.Component.ACCESS_PRIVATE属性的典型用法代码示例。如果您正苦于以下问题:Java Component.ACCESS_PRIVATE属性的具体用法?Java Component.ACCESS_PRIVATE怎么用?Java Component.ACCESS_PRIVATE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类lucee.runtime.Component
的用法示例。
在下文中一共展示了Component.ACCESS_PRIVATE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
@Override
public void init(Map arguments){
forceCFCLower=Caster.toBooleanValue(arguments.get("force-cfc-lowercase"),false);
forceQueryLower=Caster.toBooleanValue(arguments.get("force-query-lowercase"),false);
forceStructLower=Caster.toBooleanValue(arguments.get("force-struct-lowercase"),false);
// method access level
String str=Caster.toString(arguments.get("method-access-level"),"remote");
if("private".equalsIgnoreCase(str))methodAccessLevel=Component.ACCESS_PRIVATE;
else if("package".equalsIgnoreCase(str))methodAccessLevel=Component.ACCESS_PACKAGE;
else if("public".equalsIgnoreCase(str))methodAccessLevel=Component.ACCESS_PUBLIC;
else methodAccessLevel=Component.ACCESS_REMOTE;
}
示例2: toIntAccess
/**
* cast a strong access definition to the int type
* @param access access type
* @return int access type
* @throws ExpressionException
*/
public static int toIntAccess(String access) throws ExpressionException {
access=StringUtil.toLowerCase(access.trim());
if(access.equals("package"))return Component.ACCESS_PACKAGE;
else if(access.equals("private"))return Component.ACCESS_PRIVATE;
else if(access.equals("public"))return Component.ACCESS_PUBLIC;
else if(access.equals("remote"))return Component.ACCESS_REMOTE;
throw new ExpressionException("invalid access type ["+access+"], access types are remote, public, package, private");
}
示例3: toStringAccess
public static String toStringAccess(int access,String defaultValue) {
switch(access) {
case Component.ACCESS_PACKAGE: return "package";
case Component.ACCESS_PRIVATE: return "private";
case Component.ACCESS_PUBLIC: return "public";
case Component.ACCESS_REMOTE: return "remote";
}
return defaultValue;
}
示例4: toIntAccess
/**
* cast a strong access definition to the int type
* @param access access type
* @return int access type
* @throws ExpressionException
*/
public static int toIntAccess(String access) throws ApplicationException {
access=StringUtil.toLowerCase(access.trim());
if(access.equals("package"))return Component.ACCESS_PACKAGE;
else if(access.equals("private"))return Component.ACCESS_PRIVATE;
else if(access.equals("public"))return Component.ACCESS_PUBLIC;
else if(access.equals("remote"))return Component.ACCESS_REMOTE;
throw new ApplicationException("invalid access type ["+access+"], access types are remote, public, package, private");
}
示例5: _serializeComponent
/**
* serialize a Component
* @param component Component to serialize
* @param done
* @return serialized component
* @throws ConverterException
*/
private String _serializeComponent(Component component, Set<Object> done) throws ConverterException {
StringBuilder sb=new StringBuilder();
Component ca;
component=new ComponentSpecificAccess(Component.ACCESS_PRIVATE, ca=component);
boolean isPeristent=ComponentProUtil.isPersistent(ca);
deep++;
Object member;
Iterator<Key> it = component.keyIterator();
Collection.Key key;
while(it.hasNext()) {
key=Caster.toKey(it.next(),null);
member = component.get(key,null);
if(member instanceof UDF) continue;
sb.append(goIn()+"<var scope=\"this\" name="+del+XMLUtil.escapeXMLString(key.toString())+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
Property p;
Boolean remotingFetch;
Struct props = ignoreRemotingFetch?null:ComponentUtil.getPropertiesAsStruct(ca,false);
ComponentScope scope = ca.getComponentScope();
it=scope.keyIterator();
while(it.hasNext()) {
key=Caster.toKey(it.next(),null);
if(!ignoreRemotingFetch) {
p=(Property) props.get(key,null);
if(p!=null) {
remotingFetch=Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH,null),null);
if(remotingFetch==null){
if(isPeristent && ORMUtil.isRelated(p)) continue;
}
else if(!remotingFetch.booleanValue()) continue;
}
}
member = scope.get(key,null);
if(member instanceof UDF || key.equals(KeyConstants._this)) continue;
sb.append(goIn()+"<var scope=\"variables\" name="+del+XMLUtil.escapeXMLString(key.toString())+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
deep--;
try {
//return goIn()+"<struct>"+sb+"</struct>";
return goIn()+"<component md5=\""+ComponentUtil.md5(component)+"\" name=\""+XMLUtil.escapeXMLString(component.getAbsName())+"\">"+sb+"</component>";
}
catch (Exception e) {
throw toConverterException(e);
}
}
示例6: _serializeComponent
/**
* serialize a Component
* @param component Component to serialize
* @param done
* @return serialized component
* @throws ConverterException
*/
private String _serializeComponent(Component component, Map<Object,String> done) throws ConverterException {
StringBuilder sb=new StringBuilder();
Component ca;
component=new ComponentSpecificAccess(Component.ACCESS_PRIVATE, ca=component);
boolean isPeristent=ComponentProUtil.isPersistent(ca);
deep++;
Object member;
Iterator<Key> it = component.keyIterator();
Collection.Key key;
while(it.hasNext()) {
key=it.next();
member = component.get(key,null);
if(member instanceof UDF) continue;
sb.append(goIn()+"<var scope=\"this\" name="+del+key.toString()+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
Property p;
Boolean remotingFetch;
Struct props = ignoreRemotingFetch?null:ComponentUtil.getPropertiesAsStruct(ca,false);
ComponentScope scope = ca.getComponentScope();
it=scope.keyIterator();
while(it.hasNext()) {
key=Caster.toKey(it.next(),null);
if(!ignoreRemotingFetch) {
p=(Property) props.get(key,null);
if(p!=null) {
remotingFetch=Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH,null),null);
if(remotingFetch==null){
if(isPeristent && ORMUtil.isRelated(p)) continue;
}
else if(!remotingFetch.booleanValue()) continue;
}
}
member = scope.get(key,null);
if(member instanceof UDF || key.equals(KeyConstants._this)) continue;
sb.append(goIn()+"<var scope=\"variables\" name="+del+key.toString()+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
deep--;
try {
//return goIn()+"<struct>"+sb+"</struct>";
return goIn()+"<component md5=\""+ComponentUtil.md5(component)+"\" name=\""+component.getAbsName()+"\">"+sb+"</component>";
}
catch (Exception e) {
throw toConverterException(e);
}
}
示例7: _serializeComponent
/**
* serialize a Component
* @param component Component to serialize
* @param done
* @return serialized component
* @throws ConverterException
*/
private String _serializeComponent(Component component, Set<Object> done) throws ConverterException {
StringBuilder sb=new StringBuilder();
Component ca;
component=new ComponentSpecificAccess(Component.ACCESS_PRIVATE, ca=component);
boolean isPeristent=ca.isPersistent();
deep++;
Object member;
Iterator<Key> it = component.keyIterator();
Collection.Key key;
while(it.hasNext()) {
key=Caster.toKey(it.next(),null);
member = component.get(key,null);
if(member instanceof UDF) continue;
sb.append(goIn()+"<var scope=\"this\" name="+del+XMLUtil.escapeXMLString(key.toString())+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
Property p;
Boolean remotingFetch;
Struct props = ignoreRemotingFetch?null:ComponentUtil.getPropertiesAsStruct(ca,false);
ComponentScope scope = ca.getComponentScope();
it=scope.keyIterator();
while(it.hasNext()) {
key=Caster.toKey(it.next(),null);
if(!ignoreRemotingFetch) {
p=(Property) props.get(key,null);
if(p!=null) {
remotingFetch=Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH,null),null);
if(remotingFetch==null){
if(isPeristent && ORMUtil.isRelated(p)) continue;
}
else if(!remotingFetch.booleanValue()) continue;
}
}
member = scope.get(key,null);
if(member instanceof UDF || key.equals(KeyConstants._this)) continue;
sb.append(goIn()+"<var scope=\"variables\" name="+del+XMLUtil.escapeXMLString(key.toString())+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
deep--;
try {
//return goIn()+"<struct>"+sb+"</struct>";
return goIn()+"<component md5=\""+ComponentUtil.md5(component)+"\" name=\""+XMLUtil.escapeXMLString(component.getAbsName())+"\">"+sb+"</component>";
}
catch (Exception e) {
throw toConverterException(e);
}
}
示例8: _serializeComponent
/**
* serialize a Component
* @param component Component to serialize
* @param done
* @return serialized component
* @throws ConverterException
*/
private String _serializeComponent(Component component, Map<Object,String> done) throws ConverterException {
StringBuilder sb=new StringBuilder();
Component ca;
component=new ComponentSpecificAccess(Component.ACCESS_PRIVATE, ca=component);
boolean isPeristent=ca.isPersistent();
deep++;
Object member;
Iterator<Key> it = component.keyIterator();
Collection.Key key;
while(it.hasNext()) {
key=it.next();
member = component.get(key,null);
if(member instanceof UDF) continue;
sb.append(goIn()+"<var scope=\"this\" name="+del+key.toString()+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
Property p;
Boolean remotingFetch;
Struct props = ignoreRemotingFetch?null:ComponentUtil.getPropertiesAsStruct(ca,false);
ComponentScope scope = ca.getComponentScope();
it=scope.keyIterator();
while(it.hasNext()) {
key=Caster.toKey(it.next(),null);
if(!ignoreRemotingFetch) {
p=(Property) props.get(key,null);
if(p!=null) {
remotingFetch=Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH,null),null);
if(remotingFetch==null){
if(isPeristent && ORMUtil.isRelated(p)) continue;
}
else if(!remotingFetch.booleanValue()) continue;
}
}
member = scope.get(key,null);
if(member instanceof UDF || key.equals(KeyConstants._this)) continue;
sb.append(goIn()+"<var scope=\"variables\" name="+del+key.toString()+del+">");
sb.append(_serialize(member,done));
sb.append(goIn()+"</var>");
}
deep--;
try {
//return goIn()+"<struct>"+sb+"</struct>";
return goIn()+"<component md5=\""+ComponentUtil.md5(component)+"\" name=\""+component.getAbsName()+"\">"+sb+"</component>";
}
catch (Exception e) {
throw toConverterException(e);
}
}