Skip to content

Commit

Permalink
remove ObjectAttributable (was never used)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 15, 2019
1 parent b8967a6 commit 2b21717
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,4 @@ default ObjectTag getNextObjectTypeDown() {
default ObjectTag specialTagProcessing(Attribute attribute) {
return null;
}

interface ObjectAttributable extends ObjectTag {

<T extends ObjectTag> T asObjectType(Class<T> type, TagContext context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.Map;
import java.util.regex.Matcher;

public class CustomObjectTag implements ObjectTag, ObjectTag.ObjectAttributable, Adjustable {
public class CustomObjectTag implements ObjectTag, Adjustable {

// <--[language]
// @name Custom Objects
Expand Down Expand Up @@ -125,11 +125,6 @@ public boolean isUnique() {
return false;
}

@Override
public <T extends ObjectTag> T asObjectType(Class<T> type, TagContext context) {
return null;
}

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {
if (attribute == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ElementTag implements ObjectTag, ObjectTag.ObjectAttributable {
public class ElementTag implements ObjectTag {

// <--[language]
// @name ElementTags
Expand Down Expand Up @@ -2573,11 +2573,6 @@ public static void registerTag(String name, TagRunnable.ObjectForm runnable) {
tagProcessor.registerTag(name, runnable);
}

@Override
public <T extends ObjectTag> T asObjectType(Class<T> type, TagContext context) {
return null;
}

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {
return tagProcessor.getObjectAttribute(this, attribute);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.*;
import java.util.regex.Pattern;

public class ListTag extends ArrayList<String> implements ObjectTag, ObjectTag.ObjectAttributable {
public class ListTag extends ArrayList<String> implements ObjectTag {

// <--[language]
// @name ListTag
Expand Down Expand Up @@ -1987,11 +1987,6 @@ public ObjectTag getNextObjectTypeDown() {
return (flag != null && size() == 1) ? getObject(0) : new ElementTag(identifyList());
}

@Override
public <T extends ObjectTag> T asObjectType(Class<T> type, TagContext context) {
return null;
}

@Override
public ObjectTag specialTagProcessing(Attribute attribute) {
String attrLow = attribute.getAttributeWithoutContext(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.denizenscript.denizencore.utilities.CoreUtilities;
import com.denizenscript.denizencore.utilities.debugging.Debug;

public class QueueTag implements ObjectTag, ObjectTag.ObjectAttributable, Adjustable {
public class QueueTag implements ObjectTag, Adjustable {

// <--[language]
// @name QueueTag
Expand Down Expand Up @@ -314,11 +314,6 @@ public ObjectTag getObjectAttribute(Attribute attribute) {
return tagProcessor.getObjectAttribute(this, attribute);
}

@Override
public <T extends ObjectTag> T asObjectType(Class<T> type, TagContext context) {
return null;
}

public void ensure() {
while (queue.replacementQueue != null) {
queue = queue.replacementQueue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ public static <T extends ObjectTag> T asType(ObjectTag inp, Class<T> type, TagCo
if (type == ElementTag.class) {
return (T) new ElementTag(inp.toString());
}
if (inp instanceof ObjectTag.ObjectAttributable) {
T temp = ((ObjectTag.ObjectAttributable) inp).asObjectType(type, context);
if (temp != null) {
return temp;
}
}
return ObjectFetcher.getObjectFrom(type, inp.toString(), context);
}

Expand Down

0 comments on commit 2b21717

Please sign in to comment.